<?php
	$servername="localhost";
	$username="root";
	$password="123456789";

	// 创建连接
	// $conn=new mysqli($servername,$username,$password);
	$conn=mysqli_connect($servername,$username,$password);

	// 检测连接
	/*if($conn->connect_error){
		die("Connection failed:".$conn->connect_error);
	}
	echo "Connected successfully";*/

	try{
		$conn=new PDO("mysql:host=$servername;dbname=webDB",$username,$password);
		echo"Connected successfully";
	}
	catch(PDOException $e){
		echo $e->getMessage();
	}
?>